<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title> {$action} | {:get_opinion('title')}</title>

    <include file="Public:head"/>
    <style>
        .table>tbody>tr>td{
            vertical-align:middle;
            padding: 3px 8px 3px 8px;
        }
    </style>
</head>
<body class="skin-blue">

{:W('Common/header')}

<div class="wrapper row-offcanvas row-offcanvas-left">
    {:W('Common/sideMenu')}


    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->


        <section class="content-header">
            <h1>
                {$action}
                <small>{:get_opinion('title')}</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{$module_url}"><i class="fa fa-dashboard"></i> {$module}</a></li>
                <li class="active">{$action}</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-md-12">

                    <!-- /.box-header -->
                    <div class="box-body">

                        <div class="row">

                            <div class="col-md-3">
                                <div class="btn-group">
                                    <a href="{:U('Admin/Posts/addTag')}">
                                        <button id="sample_editable_1_new" class="btn btn-success">
                                            添加新标签<i class="icon-plus"></i>
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>


                        <table class="table table-striped table-bordered table-hover"
                               id="sample_1">
                            <thead>
                            <tr>
                                <th style="width: 8px;"><input type="checkbox"
                                                               class="group-checkable"
                                                               id="check-all" data-set="#sample_1 .checkboxes"/>
                                </th>
                                <th>标签ID</th>
                                <th>名称</th>
                                <th class="hidden-480">别名</th>
                                <th>文章数量</th>
                                <th>操作</th>

                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="tags" item="v">

                                <tr class="odd gradeX">
                                    <td><input type="checkbox" class="checkboxes" value="1"/></td>
                                    <td>{$v.tag_id}</td>
                                    <td class=""><a
                                            href="{:U('Admin/Posts/editTag', array('id' => $v['tag_id']))}"
                                            title="{$v.tag_name}">{$v.tag_name|mb_substr=0,30,"UTF-8"}</a></td>
                                    <td class="hidden-480"><a
                                            href="{:U('Admin/Posts/editTag', array('id' => $v['tag_id']))}">{$v.tag_slug|mb_substr=0,30,"UTF-8"}</a>
                                    </td>
                                    <td>
                                        <a class="btn  btn-sm  btn-success"
                                           href="{:U('Admin/Posts/index', array('tag' => $v['tag_id']))}">
                                            {$v['post_count']} 篇文章</a>

                                    </td>

                                    <td>
                                        <a class="btn  btn-sm  btn-primary"
                                           href="{:U('Admin/Posts/editTag', array('id' => $v['tag_id']))}">编辑</a>
                                        <a  class="btn  btn-sm  btn-danger"
                                           href="{:U('Admin/Posts/preDelTag', array('id' => $v['tag_id']))}">删除</a>
                                    </td>


                                </tr>
                            </foreach>
                            </tbody>
                        </table>

                        <div>
                            <ul class="pagination"> {$pager}</ul>
                        </div>


                    </div>


                </div>
            </div>
</div>


</section>
<!-- /.content -->
</aside>
<!-- /.right-side -->
</div>
<!-- ./wrapper -->

<include file="Public:foot"/>

</body>
</html>